package com.dingreading.cloud.admin.mapper;

import com.dingreading.cloud.admin.dto.StoreProjectCycleDtoV2;
import com.dingreading.cloud.admin.entity.StoreProjectCycle;
import com.mybatisflex.core.BaseMapper;
import org.apache.ibatis.annotations.Param;

/**
 * 映射层。
 *
 * @author Administrator
 * @since 2023-11-22
 */
public interface StoreProjectCycleMapper extends BaseMapper<StoreProjectCycle> {

    /**
     * 按门店uid、服务uid、次数或天数，查询最接近的单价
     */
    StoreProjectCycleDtoV2 getDtoByProjectUidAndCnt(
            @Param("selfStore") boolean selfStore, @Param("storeUid") String storeUid, @Param("projectUid") String projectUid,
            @Param("consumeType") Integer consumeType, @Param("cnt") Integer cnt
    );

}
